<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%  
String path = request.getContextPath();  
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";  
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, width=device-width">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta content="black" name="apple-mobile-web-app-status-bar-style">
	<meta name="format-detection" content="telephone=no">
	<meta content="telephone=no" name="format-detection">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<link rel="stylesheet" media="screen and (max-width:900px)" href="<%=basePath%>resources/css/report_style_wap.css" type="text/css" /> 
	<link rel="stylesheet" media="screen and (min-width:900px)" href="<%=basePath%>resources/css/report_style_pc.css" type="text/css" /> 
	<title>体检报告</title>
</head>
<body>
	<div class="index">
		<div class="title">博士星人工智能健康体检中心</div>
		<div class="subtil">
		<c:if test="${report.reportType == 1}">中医亚健康检测</c:if>
		<c:if test="${report.reportType == 2}">中医舌苔检测</c:if>
		</div>
		<div class="table">
			<div class="tr">
				<p class="td">姓名：<span class="td-in">${report.userName }</span></p>
				<p class="td">性别：<span class="td-in">
				<c:choose>
				   <c:when test="${report.userSex == 1}">男</c:when>
				   <c:when test="${report.userSex == 2}">女</c:when>
				   <c:otherwise>未填写</c:otherwise>
				</c:choose>
				</span></p>
				<p class="td">年龄：<span class="td-in">${age }</span></p>
				<p class="td">检测时间：<span class="td-in"><fmt:formatDate value="${report.createTime}" pattern="yyyy-MM-dd  HH:mm"  /></span></p>
				<p class="td">报告编号：<span class="td-in">${report.reportNo }</span></p>
				<p class="td">血型：<span class="td-in">未知</span></p>
			</div>
			<p class="tda">检测项目：<span class="td-in">${report.checkItem }</span></p>
		</div>
		<div class="cells">
			<div class="cell">
				<table class="ctable" cellspacing="0" border="0"  cellpadding="0">
					<tr><th>图示</th><th>名称</th><th>健康状况</th></tr>
					<c:forEach items="${report.reportItemList }" var="item" varStatus="itemStatus">
					<c:if test="${itemStatus.index % 2 == 0 }">
					<tr>
						<td>
							<p class="ico" style="background-image: url(${item.partPath})"></p>
						</td>
						<td> ${item.partName } </td>
						<td>${item.influenceLevel }</td>
					</tr>
					</c:if>
					</c:forEach>
				</table>
			</div>
			<div class="cell">
				<table class="ctable" cellspacing="0" border="0"  cellpadding="0">
					<tr><th>图示</th><th>名称</th><th>健康状况</th></tr>
					<c:forEach items="${report.reportItemList }" var="item" varStatus="itemStatus">
					<c:if test="${itemStatus.index % 2 != 0 }">
					<tr>
						<td>
							<p class="ico" style="background-image: url(${item.partPath})"></p>
						</td>
						<td> ${item.partName } </td>
						<td>${item.influenceLevel }</td>
					</tr>
					</c:if>
					</c:forEach>
				</table>
			</div>
		</div>
		<div class="tip">结果为A、B状况良好，结果为C、D存在一般亚健康，结果为E、F 存在较为严重的亚健康</div>
		<div class="from">检测员：王医生</div>
		<!-- 此标签辅助打印控制高度，自由修稿高度 -->
		<div class="hr" style="height: 100px;"></div>
		<div class="descr">
			<c:forEach items="${report.reportItemList }" var="item" varStatus="itemStatus">
			<div class="item">
				<p class="itil">部位：${item.partName }</p>
				<p class="ileft" style="background-image: url(${item.partPath})"></p>
				<div class="irigt">
					<p class="irtil"><span class="irtil-ls">影响程度：
					<c:choose>
					   <c:when test="${item.influenceLevel == 'A' || item.influenceLevel== 'B'}">良好</c:when>
					   <c:when test="${item.influenceLevel == 'C' || item.influenceLevel== 'D'}">一般</c:when>
					   <c:when test="${item.influenceLevel == 'E' || item.influenceLevel== 'F'}">严重</c:when>
					</c:choose>
					</span>
					<!-- 
					<span class="irtil-ls">持续时间：6周</span>
					 -->
					<span class="irtil-ls">致病性：
					<c:choose>
					   <c:when test="${item.influenceLevel == 'A' || item.influenceLevel== 'B'}">低</c:when>
					   <c:when test="${item.influenceLevel == 'C' || item.influenceLevel== 'D'}">中</c:when>
					   <c:when test="${item.influenceLevel == 'E' || item.influenceLevel== 'F'}">高</c:when>
					</c:choose>
					</span></p>
					<div class="ul">
						<c:forEach items="${item.reportPart.adviceList }" var="advice" varStatus="itemStatus">
						<p class="li">${advice.content }</p>
						</c:forEach>
					</div>
				</div>
			</div>
			</c:forEach>
			<!-- 
			<div class="descr-bot">
				<p class="desb-ls"><img src="<%=basePath%>resources/img/level_1.jpeg" class="desb-ls-io">正常良好的状态</p>
				<p class="desb-ls"><img src="<%=basePath%>resources/img/level_2.jpeg" class="desb-ls-io">标准健康的状态</p>
				<p class="desb-ls"><img src="<%=basePath%>resources/img/level_3.jpeg" class="desb-ls-io">可能自我修复的功能状态</p>
				<p class="desb-ls"><img src="<%=basePath%>resources/img/level_4.jpeg" class="desb-ls-io">开始衰弱的功能状态</p>
				<p class="desb-ls"><img src="<%=basePath%>resources/img/level_5.jpeg" class="desb-ls-io">透支到受损的功能状态</p>
				<p class="desb-ls"><img src="<%=basePath%>resources/img/level_6.jpeg" class="desb-ls-io">透支到危机的功能状态</p>
			</div>
			 -->
		</div>
		<!-- 此标签辅助打印控制高度，自由修稿高度 -->
		<div class="hr" style="height: 100px;"></div>
		<div class="resu">
			<p class="res-til">健康建议：</p>
			<c:forEach items="${report.reportItemList }" var="item" varStatus="itemStatus">
				<c:if test="${item.reportPart != null && item.reportPart.reportPartHealthy != null}">
				<p class="res-ls">${item.reportPart.name }:</p>
				<p class="res-ls">${item.reportPart.reportPartHealthy.content }</p>
				</c:if>
			</c:forEach>
			<p class="res-jy">专家建议：</p>
			<div class="emp">
				专家签名：
			</div>
			<p class="res-bot">笨报告非医疗诊断报告，任何医疗行为请遵从医嘱。</p>
		</div>
	</div>
</body>
</html>
